//
//  HttpEngine.h
//  ChinaBookingPhone
//
//  Created by 杨 锐 on 14-7-2.
//  Copyright (c) 2014年 ChinaBooking. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface HttpHelper : NSObject


+(void)HttpPostRequest:(NSString *)url
            parameters:(NSDictionary *)parameters
               success:(void (^)(id responseDic))success
               failure:(void (^)(NSError *error))failure;

+(void)HttpGetRequest:(NSString *)url
           parameters:(NSDictionary *)parameters
              success:(void (^)(id responseDic))success
              failure:(void (^)(NSError *error))failure;

+(void)HttpRequestWebservice:(NSString *)url
                  parameters:(NSDictionary *)parameters
                     success:(void (^)(id responseDic))success
                     failure:(void (^)(NSError *error))failure;

+(AFHTTPRequestOperation *)HttpPostImgWithURL:(NSString *)url
                                       params:(NSDictionary*)params
                                    ImageData:(UIImage *)image
                        ImgCompressionQuality:(CGFloat)compressionQuality
                          UpLoadProgressBlock:(void (^)(float Progress))ProgressBlock
                            UpLoadWithSuccess:(void (^)(AFHTTPRequestOperation *result))success
                            UpLoadWithFailure:(void (^)(NSError *error))failure;

@end
